<template>
 <div>
  <FromData ref="sonFrom"></FromData>
  <button @click="submit">登录</button>
 </div>
</template>

<script>
import FromData from './components/from-data.vue'

export default {
  components:{
    FromData,
  },
  methods:{
    submit(){
      // 调取子组件的方法
      this.$refs.sonFrom.submit()
    }
  }
}
</script>

<style scoped>

</style>
